﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Revis.VClinicNet.Core.Domain
{
    public class Address
    {
        public virtual string StreetName { get; protected set; }
        public virtual string HomeNumber { get; protected set; }
        public virtual string PostalCode { get; protected set; }
        public virtual string City { get; protected set; }
        public virtual string Municipality { get; protected set; }
        public virtual string Telephone { get; protected set; }

        public Address() :
            this(String.Empty,String.Empty,String.Empty,String.Empty,String.Empty,String.Empty)
        {            
        }

        public Address(string streetName, string homeNumber, string postalCode,
            string city, string municipality, string telephone)
        {
            if (streetName == null) {
                throw new ArgumentNullException("Null streetName");
            }
            if (homeNumber == null) {
                throw new ArgumentNullException("Null homeNumber");
            }
            if (postalCode == null) {
                throw new ArgumentNullException("Null postalCode");
            }
            if (city == null) {
                throw new ArgumentNullException("Null city");
            }
            if (municipality == null) {
                throw new ArgumentNullException("Null municipality");
            }
            if (telephone == null) {
                throw new ArgumentNullException("Null telephone");
            }
            StreetName = streetName;
            HomeNumber = homeNumber;
            PostalCode = postalCode;
            City = city;
            Municipality = municipality;
            Telephone = telephone;
        }
    }
}
